0f809af53ca1619cf8d11203eb56a43e4e02016a,portal-impl/test/integration/com/liferay/portlet/asset/service/AssetCategoryServiceTest.java,AssetCategoryServiceTest,testRemoveVocabularyShouldUpdateCategoriesTree,#,45

Before Change


	public void testRemoveVocabularyShouldUpdateCategoriesTree()
		throws Exception {

		long groupId = GroupTestUtil.addGroup().getGroupId();

		AssetVocabulary v1 = AssetTestUtil.addVocabulary(groupId);
		AssetVocabulary v2 = AssetTestUtil.addVocabulary(groupId);

		AssetCategory c1a = AssetTestUtil.addCategory(
			groupId, v1.getVocabularyId());

		assertLeftRightCategory(2, c1a);

		AssetCategory c1b = AssetTestUtil.addCategory(
			groupId, v1.getVocabularyId());

		assertLeftRightCategory(4, c1b);

		AssetCategory c1c = AssetTestUtil.addCategory(
			groupId, v1.getVocabularyId());

		assertLeftRightCategory(6, c1c);

After Change



		Group group = GroupTestUtil.addGroup();

		long groupId = group.getGroupId();

		AssetVocabulary vocabulary1 = AssetTestUtil.addVocabulary(groupId);
		AssetVocabulary vocabulary2 = AssetTestUtil.addVocabulary(groupId);

		AssetCategory category1a = AssetTestUtil.addCategory(
			groupId, vocabulary1.getVocabularyId());

		assertLeftRightCategory(2, category1a);

		AssetCategory category1b = AssetTestUtil.addCategory(
			groupId, vocabulary1.getVocabularyId());

		assertLeftRightCategory(4, category1b);

		AssetCategory category1c = AssetTestUtil.addCategory(
			groupId, vocabulary1.getVocabularyId());

		assertLeftRightCategory(6, category1c);

		AssetCategory category2a = AssetTestUtil.addCategory(
			groupId, vocabulary2.getVocabularyId());

		assertLeftRightCategory(8, category2a);

		AssetCategory category2b = AssetTestUtil.addCategory(
			groupId, vocabulary2.getVocabularyId());

		assertLeftRightCategory(10, category2b);